package com.cxl.live.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * @Description: BaseException
 * 基础异常类
 * @Author: ChenXueLi
 * @Date: 2018-11-10 13:00
 */
public class BaseException extends RuntimeException {

    /**
     * 错误编码
     */
    @Getter @Setter protected int code;

    /**
     * 错误信息
     */
    @Getter @Setter protected String message;

    public BaseException() {}

    public BaseException(String message) {
        this.message = message;
    }

    public BaseException(int code, String message) {
        super(message);
        this.message = message;
        this.code = code;
    }

}
